package inherited;

class Testing {
	public void action() {
		System.out.println("This is an animal.");
	}
}

class Cow extends Testing {
	public void action() {
		System.out.println("This is a Cow.");
	}
}

class Dog extends Testing {
	public void action() {
		System.out.println("This is a Dog.");
	}
}

public class Animal {
	public static void main(String [] args) {
		Testing t = new Testing();
		Cow c = new Cow();
		Dog d = new Dog();
		
		t.action();
		c.action();
		d.action();	
	}
}
